home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_03
/
2n03023b
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1991-01-09
|
279 b
|
18 lines
/*
* Compare two int arrays, a and b. Return 1 if, for
* all i from 0 to n-1, a[i] == b[i]; otherwise return
* 0.
*/
int equal(const int a[], const int b[], size_t n)
{
size_t i;
for (i = 0; i < n; ++i)
if (a[i] != b[i])
return 0;
return 1;
}